/**
 * Copyright 2006 Brad Reynolds
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.leeloo.databinding.ui.event;

import org.leeloo.databinding.ui.descriptor.ObservableDescriptor;

/**
 * The only reason for having this event is to retrieve the property name.  It is not displayed and is subject to be removed.
 * 
 * @author Brad Reynolds
 */
public class JavaBeanObservableValueConstructedEvent extends AbstractEvent {
    private ObservableDescriptor observableDescriptor;
    private String propertyName;
    
    public JavaBeanObservableValueConstructedEvent() {    
    }
    
    public String getTypeDisplay() {
        return Messages.getString("JavaBeanObservableValueConstructedEvent.event_name"); //$NON-NLS-1$
    }
    
    public String getDisplay() {
        //there is no display
        return null;
    }
    
    /**
     * @return the propertyName
     */
    public String getPropertyName() {
        return propertyName;
    }

    /**
     * @param propertyName the propertyName to set
     */
    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    /**
     * @return the observableDescriptor
     */
    public ObservableDescriptor getObservableDescriptor() {
        return observableDescriptor;
    }

    /**
     * @param observableDescriptor the observableDescriptor to set
     */
    public void setObservableDescriptor(ObservableDescriptor observableDescriptor) {
        this.observableDescriptor = observableDescriptor;
    }
}